package cn.codergege.myspider.component;

import java.util.Map;

/**
 * 封装返回结果, statusCode, content
 * TODO: contentLength, contentType, contentEncoding...
 * // TODO: 2019-05-30 放 request 吗? 或者 allHeaders
 */
// TODO: 2019-05-30 @Getter @Setter
public class Response {
    private int statusCode;
    private String content;
    private Map<String, String> headers;

    public Response() {}

    public Response(String content) {
        this.statusCode = 200;
        this.content = content;
    }

    public Response(int statusCode, String Content) {
        this.statusCode = statusCode;
        this.content = content;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }
}
